<?php
if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );
/**
*
* @package MediaLibrary
* @copyright 2009 Andrey Kvasnevskiy-OrdaSoft(akbet@mail.ru);Rob de Cleen(rob@decleen.com)
* Homepage: http://www.joomlawebserver.com
* @version: 1.5.3 Basic $
*
**/



include_once( dirname(__FILE__).'/compat.joomla1.5.php' );


 //*** Get language files
global $mosConfig_absolute_path, $mosConfig_lang;

$mosConfig_absolute_path = $GLOBALS['mosConfig_absolute_path'];
require_once($mosConfig_absolute_path."/administrator/components/com_medialibrary/menubar_ext.php");


if (file_exists($mosConfig_absolute_path."/components/com_medialibrary/language/{$mosConfig_lang}.php" )) {
	include_once($mosConfig_absolute_path."/components/com_medialibrary/language/{$mosConfig_lang}.php" );
} else {
	include_once($mosConfig_absolute_path."/components/com_medialibrary/language/english.php" );
       }


class menucat {
	function NEW_CATEGORY() {
		mosMenuBar_ext::startTable();
		mosMenuBar_ext::save();
		mosMenuBar_ext::cancel();
		mosMenuBar_ext::spacer();
		mosMenuBar_ext::endTable();
	}
	function EDIT_CATEGORY() {
		mosMenuBar_ext::startTable();
		mosMenuBar_ext::save();
		mosMenuBar_ext::cancel();
		mosMenuBar_ext::spacer();
		mosMenuBar_ext::endTable();
	}
	function SHOW_CATEGORIES() {
		mosMenuBar_ext::startTable();
		mosMenuBar_ext::publishList();
		mosMenuBar_ext::unpublishList();
		mosMenuBar_ext::addNew();
		mosMenuBar_ext::editList();
		mosMenuBar_ext::deleteList();
		mosMenuBar_ext::spacer();
		mosMenuBar_ext::endTable();
	}
  	function DEFAULT_CATEGORIES() {
    		mosMenuBar_ext::startTable();
    		mosMenuBar_ext::publishList();
    		mosMenuBar_ext::unpublishList();
    		mosMenuBar_ext::addNew('new', 'Add');
    		mosMenuBar_ext::editList();
    		mosMenuBar_ext::deleteList();
    		mosMenuBar_ext::endTable();
  } 

}


class menumedialibrary 
{
  
	function MENU_NEW()
  { 
		mosMenuBar_ext::startTable();
		mosMenuBar_ext::save();
		mosMenuBar_ext::cancel();
		//mosMenuBar::help(./components/com_medialibrary/help/1.html);
		mosMenuBar_ext::spacer();				
		mosMenuBar_ext::endTable();
	}

	function MENU_EDIT() {
		mosMenuBar_ext::startTable(); 
		mosMenuBar_ext::save();

		//*******************  begin add for review edit  **********************
		mosMenuBar_ext::editList('edit_review',_MEDIALIBRARY_TOOLBAR_ADMIN_EDIT_REVIEW);
		mosMenuBar_ext::deleteList('','delete_review',_MEDIALIBRARY_TOOLBAR_ADMIN_DELETE_REVIEW );
		//*******************  end add for review edit  ************************

		mosMenuBar_ext::cancel();
		//mosMenuBar::help();
		mosMenuBar_ext::spacer();		
		mosMenuBar_ext::endTable();
	}

	function MENU_DELETE_REVIEW() {
		mosMenuBar_ext::startTable();
		mosMenuBar_ext::save();
		mosMenuBar_ext::spacer();		

		//*******************  begin add for review edit  **********************
		mosMenuBar_ext::editList('edit_review',_MEDIALIBRARY_TOOLBAR_ADMIN_EDIT_REVIEW);
		mosMenuBar_ext::deleteList('','delete_review',_MEDIALIBRARY_TOOLBAR_ADMIN_DELETE_REVIEW );
		//*******************  end add for review edit  ************************

		mosMenuBar_ext::spacer();		
		mosMenuBar_ext::cancel();
		//mosMenuBar::help();
		mosMenuBar_ext::spacer();		
		mosMenuBar_ext::endTable();
	}

	function MENU_EDIT_REVIEW() {
		mosMenuBar_ext::startTable();
		mosMenuBar_ext::save('update_review');
		mosMenuBar_ext::cancel('cancel_review_edit');
		mosMenuBar_ext::spacer();		
		mosMenuBar_ext::endTable();

	}

	function MENU_CANCEL() {
		mosMenuBar_ext::startTable();
		mosMenuBar_ext::back();  //old valid  mosMenuBar::cancel();
		//mosMenuBar::help();
		mosMenuBar_ext::spacer();		
		mosMenuBar_ext::endTable();
	}

	function MENU_CONFIG_FRONTEND() {
		mosMenuBar_ext::startTable();
	        mosMenuBar_ext::save('config_save_frontend');
		mosMenuBar_ext::cancel();
		//mosMenuBar::help();
		mosMenuBar_ext::spacer();		
		mosMenuBar_ext::endTable();
	}

	function MENU_CONFIG_BACKEND() {
		mosMenuBar_ext::startTable();
		mosMenuBar_ext::save('config_save_backend');
		mosMenuBar_ext::cancel();
		//mosMenuBar::help();
		mosMenuBar_ext::spacer();		
		mosMenuBar_ext::endTable();
	}

//**************   begin for manage reviews   *********************
	function MENU_MANAGE_REVIEW() {
		mosMenuBar_ext::startTable();
		mosMenuBar_ext::editList('edit_manage_review',_MEDIALIBRARY_TOOLBAR_ADMIN_EDIT_REVIEW);
		mosMenuBar_ext::spacer();
		mosMenuBar_ext::deleteList('','delete_manage_review',_MEDIALIBRARY_TOOLBAR_ADMIN_DELETE_REVIEW);
		mosMenuBar_ext::endTable();
	}

	function MENU_MANAGE_REVIEW_DELETE() {
		mosMenuBar_ext::startTable();
		mosMenuBar_ext::editList('edit_manage_review',_MEDIALIBRARY_TOOLBAR_ADMIN_EDIT_REVIEW);
		mosMenuBar_ext::spacer();
		mosMenuBar_ext::deleteList('','delete_manage_review',_MEDIALIBRARY_TOOLBAR_ADMIN_DELETE_REVIEW);
		mosMenuBar_ext::endTable();
	}

	function MENU_MANAGE_REVIEW_EDIT() {
		mosMenuBar_ext::startTable();
		mosMenuBar_ext::save('update_edit_manage_review');
		mosMenuBar_ext::spacer();
		mosMenuBar_ext::cancel('cancel_edit_manage_review');
		mosMenuBar_ext::endTable();
	}

	function MENU_MANAGE_REVIEW_EDIT_EDIT() {
		mosMenuBar_ext::startTable();
		mosMenuBar_ext::editList('edit_manage_review',_MEDIALIBRARY_TOOLBAR_ADMIN_EDIT_REVIEW);
		mosMenuBar_ext::spacer();
		mosMenuBar_ext::deleteList('','delete_manage_review',_MEDIALIBRARY_TOOLBAR_ADMIN_DELETE_REVIEW);
		mosMenuBar_ext::endTable();
	}
//**************   end for manage reviews   ***********************

//**************   begin for manage suggestion    *****************
	function MENU_MANAGE_SUGGESTION() 
        {
		mosMenuBar_ext::startTable();
    mosMenuBar_ext::NewCustom('view_suggestion','adminForm',
      "../administrator/components/com_medialibrary/images/dm_view_button.png",
      "../administrator/components/com_medialibrary/images/dm_view_button_32.png",
      _MEDIALIBRARY_TOOLBAR_VIEW_SUGGESTION,_MEDIALIBRARY_TOOLBAR_ADMIN_VIEW_SUGGESTION,
     true, "adminForm");

		mosMenuBar_ext::deleteList('','delete_suggestion',_MEDIALIBRARY_TOOLBAR_ADMIN_DELETE_SUGGESTION);
		mosMenuBar_ext::endTable();
	}

	function MENU_MANAGE_SUGGESTION_VIEW() {
		mosMenuBar_ext::startTable();
    mosMenuBar_ext::deleteList('','delete_suggestion',_MEDIALIBRARY_TOOLBAR_ADMIN_DELETE_SUGGESTION);  
    mosMenuBar_ext::spacer();
		mosMenuBar_ext::back("Back","index2.php?option=com_medialibrary&task=manage_suggestion");

		mosMenuBar_ext::spacer();
		mosMenuBar_ext::spacer();
		mosMenuBar_ext::endTable();
	}
//**************   end for manage suggestion    *******************

  function MENU_MUSIC()
  {
		mosMenuBar_ext::startTable();
		mosMenuBar_ext::publishList();
		mosMenuBar_ext::unpublishList();
		mosMenuBar_ext::spacer();
    mosMenuBar_ext::NewCustom('refetchInfos','adminForm',
      '../administrator/components/com_medialibrary/images/dm_refetchInfos.png',
      '../administrator/components/com_medialibrary/images/dm_refetchInfos_32.png',
      _MEDIALIBRARY_TOOLBAR_REFETCH_INFORMATION,_MEDIALIBRARY_TOOLBAR_ADMIN_REFRESH,
      true, 'adminForm');

	  mosMenuBar_ext::NewCustom('lend','adminForm',
      "../administrator/components/com_medialibrary/images/dm_lend.png",
      "../administrator/components/com_medialibrary/images/dm_lend_32.png",
      _MEDIALIBRARY_TOOLBAR_LEND_MEDIA,_MEDIALIBRARY_TOOLBAR_ADMIN_LEND,true,'adminForm');
		
    mosMenuBar_ext::NewCustom('lend_return','adminForm',
      "../administrator/components/com_medialibrary/images/dm_lend_return.png",
      "../administrator/components/com_medialibrary/images/dm_lend_return_32.png",
      _MEDIALIBRARY_TOOLBAR_RETURN_MEDIA,_MEDIALIBRARY_TOOLBAR_ADMIN_RETURN,true,'adminForm');  

    mosMenuBar_ext::addNew("new_music");
		mosMenuBar_ext::deleteList();
		mosMenuBar_ext::spacer();		
		mosMenuBar_ext::endTable();
  }

	
	function MENU_DEFAULT() {
		mosMenuBar_ext::startTable();
		mosMenuBar_ext::publishList();
		mosMenuBar_ext::unpublishList();
		 
    mosMenuBar_ext::spacer();  
	  mosMenuBar_ext::NewCustom('refetchInfos','adminForm',
      '../administrator/components/com_medialibrary/images/dm_refetchInfos.png',
      '../administrator/components/com_medialibrary/images/dm_refetchInfos_32.png',
      _MEDIALIBRARY_TOOLBAR_REFETCH_INFORMATION,_MEDIALIBRARY_TOOLBAR_ADMIN_REFRESH,
      true, 'adminForm');
                
	  mosMenuBar_ext::NewCustom('lend','adminForm',
      "../administrator/components/com_medialibrary/images/dm_lend.png",
      "../administrator/components/com_medialibrary/images/dm_lend_32.png",
      _MEDIALIBRARY_TOOLBAR_LEND_MEDIA,_MEDIALIBRARY_TOOLBAR_ADMIN_LEND,
      true,'adminForm');		
		
    mosMenuBar_ext::NewCustom('lend_return','adminForm',
        "../administrator/components/com_medialibrary/images/dm_lend_return.png",
        "../administrator/components/com_medialibrary/images/dm_lend_return_32.png",
        _MEDIALIBRARY_TOOLBAR_RETURN_MEDIA,_MEDIALIBRARY_TOOLBAR_ADMIN_RETURN,true,'adminForm');	
    mosMenuBar_ext::addNew();
    mosMenuBar_ext::spacer();
		mosMenuBar_ext::deleteList();
		mosMenuBar_ext::spacer();		
		mosMenuBar_ext::endTable();
	}

  function MENU_SAVE_BACKEND()
  {
    mosMenuBar_ext::startTable();
    mosMenuBar_ext::spacer();
    mosMenuBar_ext::save();
    mosMenuBar_ext::spacer();
    mosMenuBar_ext::back();	             
    mosMenuBar_ext::spacer(); 
    mosMenuBar_ext::endTable();                    
  }


	function MENU_LEND() {
		mosMenuBar_ext::startTable();

		mosMenuBar_ext::NewCustom('lend','adminForm',
      "../administrator/components/com_medialibrary/images/dm_lend.png",
      "../administrator/components/com_medialibrary/images/dm_lend_32.png",
      _MEDIALIBRARY_TOOLBAR_LEND_MEDIA,_MEDIALIBRARY_TOOLBAR_ADMIN_LEND,true,'adminForm');

    mosMenuBar_ext::cancel();
		mosMenuBar_ext::spacer();		
		mosMenuBar_ext::endTable();
	}

	function MENU_LENDREQUESTS() 
  {
    global $mosConfig_absolute_path;
		mosMenuBar_ext::startTable();
                
    mosMenuBar_ext::NewCustom('accept_lend_requests','adminForm',
      '../administrator/components/com_medialibrary/images/dm_accept.png',
      '../administrator/components/com_medialibrary/images/dm_accept_32.png',
      _MEDIALIBRARY_TOOLBAR_ACCEPT_REQUEST,_MEDIALIBRARY_TOOLBAR_ADMIN_ACCEPT,
      true, 'adminForm');

    mosMenuBar_ext::NewCustom('decline_lend_requests','adminForm',
      '../administrator/components/com_medialibrary/images/dm_decline.png',
      '../administrator/components/com_medialibrary/images/dm_decline_32.png',
      _MEDIALIBRARY_TOOLBAR_EXPORT,_MEDIALIBRARY_TOOLBAR_ADMIN_DECLINE,true, 'adminForm');
    

    mosMenuBar_ext::cancel();
		//mosMenuBar::help(./components/com_medialibrary/help/1.html);
		mosMenuBar_ext::spacer();		
		mosMenuBar_ext::endTable();
	}
	
	function MENU_LEND_RETURN() {
		mosMenuBar_ext::startTable();
   	mosMenuBar_ext::NewCustom('lend_return','adminForm',
      "../administrator/components/com_medialibrary/images/dm_lend_return.png",
      "../administrator/components/com_medialibrary/images/dm_lend_return_32.png",
      _MEDIALIBRARY_TOOLBAR_RETURN_MEDIA,_MEDIALIBRARY_TOOLBAR_ADMIN_RETURN,true,'adminForm');	
		mosMenuBar_ext::cancel();
		//mosMenuBar::help(./components/com_medialibrary/help/1.html);
		mosMenuBar_ext::spacer();		
		mosMenuBar_ext::endTable();
	}
	
	function MENU_REFETCH_INFOS(){
		mosMenuBar_ext::startTable();
    mosMenuBar_ext::NewCustom('refetchInfos','adminForm',
      '../administrator/components/com_medialibrary/images/dm_refetchInfos.png',
      '../administrator/components/com_medialibrary/images/dm_refetchInfos_32.png',
      _MEDIALIBRARY_TOOLBAR_REFETCH_INFORMATION,_MEDIALIBRARY_TOOLBAR_ADMIN_REFRESH,true,'adminForm');
    mosMenuBar_ext::cancel();		
		//mosMenuBar::help(./components/com_medialibrary/help/1.html);
		mosMenuBar_ext::spacer();
		mosMenuBar_ext::endTable();	
	}	

  function MENU_IMPORT_EXPORT()
  {
    mosMenuBar_ext::startTable();
    mosMenuBar_ext::NewCustom_I('import','adminForm',
      '../administrator/components/com_medialibrary/images/dm_import.png',
      '../administrator/components/com_medialibrary/images/dm_import_32.png',
      _MEDIALIBRARY_TOOLBAR_IMPORT,_MEDIALIBRARY_TOOLBAR_ADMIN_IMPORT,true,'adminForm');

    mosMenuBar_ext::NewCustom_E('export','adminForm',
      '../administrator/components/com_medialibrary/images/dm_export.png',
      '../administrator/components/com_medialibrary/images/dm_export_32.png',
      _MEDIALIBRARY_TOOLBAR_EXPORT,_MEDIALIBRARY_TOOLBAR_ADMIN_EXPORT,true,'adminForm');	
    
    mosMenuBar_ext::back();  
		mosMenuBar_ext::spacer();
		mosMenuBar_ext::endTable();	
	}

	function MENU_ABOUT(){
		mosMenuBar_ext::startTable();
		mosMenuBar_ext::back();		
		mosMenuBar_ext::endTable();	
	}
	
}
?>
